// Author: wsfuyibing <682805@qq.com>
// Date: 2025-05-01

package profile

import (
	"server/app/http/responses"
	"server/app/kind"
)

type (
	Response struct {
		Profile   *responses.UserResponse
		Statistic *responses.UserStatisticResponse
		Arcades   []*responses.ArcadeResponse
	}

	ResponseArcades struct {
		Id           kind.ArcadeId
		Verified     kind.ArcadeVerified
		VerifiedFlag string
		VerifiedText string
		VerifiedYes  bool
		Balance      kind.Balance
		PondCount    int
		PondTotal    int

		MemberCount       int
		MemberTotal       int
		MemberEnabled     kind.Enabled
		MemberEnabledFlag string
		MemberEnabledText string
		MemberEnabledYes  bool

		ShopCount       int
		ShopTotal       int
		ShopEnabled     kind.Enabled
		ShopEnabledFlag string
		ShopEnabledText string
		ShopEnabledYes  bool
		ShopDistance    int

		AdminCount  int
		FollowCount int
		Latitude    kind.GeoPoint
		Longitude   kind.GeoPoint
		Name        string
		Address     string

		Setting *ResponseSetting
	}

	ResponseProfile struct {
		UserId     kind.UserId
		Avatar     string
		Nickname   string
		Mobile     string
		Gender     kind.Gender
		GenderText string
	}

	ResponseSetting struct {
		MemberEarlyEnabled     kind.Enabled
		MemberEarlyEnabledFlag string
		MemberEarlyEnabledText string
		MemberEarlyEnabledYes  bool
		MemberEarlyHours       int

		MemberReturnEnabled     kind.Enabled
		MemberReturnEnabledFlag string
		MemberReturnEnabledText string
		MemberReturnEnabledYes  bool
		MemberReturnWithCount   float64
		MemberReturnWithWeight  float64

		MemberTicketEnabled          kind.Enabled
		MemberTicketEnabledFlag      string
		MemberTicketEnabledText      string
		MemberTicketEnabledYes       bool
		MemberTicketDiscountType     kind.DiscountType
		MemberTicketDiscountTypeText string
		MemberTicketDiscountAmount   float64

		MemberGoodsEnabled          kind.Enabled
		MemberGoodsEnabledFlag      string
		MemberGoodsEnabledText      string
		MemberGoodsEnabledYes       bool
		MemberGoodsDiscountType     kind.DiscountType
		MemberGoodsDiscountTypeText string
		MemberGoodsDiscountAmount   float64
	}

	ResponseStatistic struct {
		Balance          kind.Balance
		BalanceFreezed   kind.Balance
		Coupons          int
		ProcessingOrders int
		ArriveArcades    int
		BuyArcades       int
		ArriveBasans     int
		CreateBasans     int
	}
)

func NewResponse() *Response {
	return &Response{
		Arcades:   make([]*responses.ArcadeResponse, 0),
		Profile:   &responses.UserResponse{},
		Statistic: &responses.UserStatisticResponse{},
	}
}
